package org.nokatag.tagjava;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
/**
 * <p>@Title 快捷键绑定</p>
 * <p>@Description </p>
 * <p>@Version 1.0.0</p>
 * <p>@author rebin</p>
 * <p>@date 2016年8月30日</p>
 * <p>xiefangjian@163.com</p>
 * <p>Copyright © Noka Laboratory.All Rights Reserved.</p>
 */
public class ShortcutkeyTag extends NokaTag{
	private static final long serialVersionUID = 8699346437887227954L;

	private String shortcutkey=null;//快捷键  altKey|shiftKey|ctrlKey+ctrlKey+13
	private String inputid = null;//控件ID值
	private String jsfunction = null;//js方法
	
	public int doStartTag()throws JspException{
		JspWriter jspOut = pageContext.getOut();
		StringBuffer body = new StringBuffer();
		try {
			body.append(shortcutkey(shortcutkey,inputid,jsfunction));
			jspOut.write(body.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return EVAL_BODY_INCLUDE;
	}

	public String getShortcutkey() {
		return shortcutkey;
	}

	public void setShortcutkey(String shortcutkey) {
		this.shortcutkey = shortcutkey;
	}

	public String getInputid() {
		return inputid;
	}

	public void setInputid(String inputid) {
		this.inputid = inputid;
	}

	public String getJsfunction() {
		return jsfunction;
	}

	public void setJsfunction(String jsfunction) {
		this.jsfunction = jsfunction;
	}
}
